import request from '@/utils/request'

// 查询手环设备列表
export function listEquipment(query) {
  return request({
    url: '/shouhuan/getSheBeiList',
    method: 'get',
    params: query
  })
}
// 绑定人员
export function nameUpdate(imei_sn,truename) {
  const data = {
    imei_sn,
    truename
  }
  return request({
    url: '/shouhuan/update',
    method: 'get',
    params:data
  })
}
// 体温上报
export function temperatureUpdate(imei_sn,second) {
  const data = {
    imei_sn,
    second
  }
  return request({
    url: '/shouhuan/temperatureUpdate',
    method: 'get',
    params:data
  })
}
// 血压上报
export function booldUpdate(imei_sn,second) {
  const data = {
    imei_sn,
    second
  }
  return request({
    url: '/shouhuan/booldUpdate',
    method: 'get',
    params:data
  })
}
// 心率上报
export function heartUpdate(imei_sn,second) {
  const data = {
    imei_sn,
    second
  }
  return request({
    url: '/shouhuan/heartUpdate',
    method: 'get',
    params:data
  })
}
// 设备详情
export function shebeiDetail(imei_sn,uuid) {
  const data = {
    imei_sn,
    uuid
  }
  return request({
    url: '/shouhuan/shebeiDetail',
    method: 'get',
    params:data
  })
}
// 查询手环设备列表(所有)
export function getAllSheBeiList() {
  return request({
    url: '/shouhuan/getAllSheBeiList',
    method: 'get'
  })
}
// 获取心率历史数据
export function gethearthistory(query) {
  return request({
    url: '/shouhuan/gethearthistory',
    method: 'get',
    params: query
  })
}
// 获取血压历史数据
export function getbloodhistory(query) {
  return request({
    url: '/shouhuan/getbloodhistory',
    method: 'get',
    params: query
  })
}
// 获取体温历史数据
export function gettiwenhistory(query) {
  return request({
    url: '/shouhuan/gettiwenhistory',
    method: 'get',
    params: query
  })
}
// 获取班组长列表
export function selectBanZhuList(query) {
  return request({
    url: '/shouhuan/selectBanZhuList',
    method: 'post',
    params: query
  })
}
// 根据id查详情
export function selectBanZhuDetail(id) {
  const data = {
    id,
  }
  return request({
    url: '/shouhuan/selectBanZhuDetail',
    method: 'get',
    params:data
  })
}
// 查询手环设备下拉框
export function getSBList() {
  return request({
    url: '/shouhuan/getSBList',
    method: 'get'
  })
}
// 新增角色
export function addBanZhuInfo(data) {
  return request({
    url: '/shouhuan/addBanZhuInfo',
    method: 'post',
    data: data
  })
}
// 删除
export function deleteBanZU(id) {
  const data = {
    id
  }
  return request({
    url: '/shouhuan/deleteBanZU',
    method: 'get',
    params:data
  })
}
// 编辑
export function updateBanZhuInfo(data) {
  return request({
    url: '/shouhuan/updateBanZhuInfo',
    method: 'post',
    data: data
  })
}